package com.example.zookeeper;

import com.example.zookeeper.demo.ChildWatcher;
import com.example.zookeeper.demo.DisposableWatcherDemo;
import com.example.zookeeper.demo.PersistenceWatcherDemo;
import com.example.zookeeper.demo.ZkNodeDemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ZookeeperApplication
{

    public static void main(String[] args)
    {
        ConfigurableApplicationContext context = SpringApplication.run(ZookeeperApplication.class, args);

//        ZkNodeDemo zkNodeDemo = context.getBean(ZkNodeDemo.class);
//        zkNodeDemo.start();

//        DisposableWatcherDemo disposableWatcherDemo = context.getBean(DisposableWatcherDemo.class);
//        disposableWatcherDemo.start();

//        PersistenceWatcherDemo persistenceWatcherDemo = context.getBean(PersistenceWatcherDemo.class);
//        persistenceWatcherDemo.start();

        ChildWatcher childWatcher = context.getBean(ChildWatcher.class);
        childWatcher.start();
    }


}
